package fybug.nulll.pdstream.IO.Error.Path;
import com.sun.istack.internal.NotNull;
import com.sun.istack.internal.Nullable;

import java.io.File;

import fybug.nulll.pdfunctionlibrary.Processing.Check;
/**
 * <h2>虚路径错误.</h2>
 * <p>表示无法找到与 <b>当前路径</b> 对应的 文件 / 目录<br/>
 * {@link #file}</p>
 *
 * @author fybug
 * @version 0.0.6
 * @see Error
 * @see File
 * @since JDK 1.0
 */
@SuppressWarnings( "all" )
public
class ParamNoPath extends Error {
    private static final long serialVersionUID = 6945448987542731984L;
    /**
     * <p>发生错误的路径.</p>
     * <p>请检查该路径是否是虚路径</p>
     */
    @Nullable public final File file;

    public
    ParamNoPath(final @NotNull String string, @Nullable final File e) {
        super(string);
        file = e;
    }

    @Override
    public final
    boolean equals(@Nullable final Object obj) {
        switch ( Check.checkEquals(this, obj) ) {
            default:
                return false;
            case 1:
                return true;
            case 2:
                return Check.equalsFidle(file, ((ParamNoPath) obj).file);
        }
    }
}
